with open('learning_python.txt') as file_object:
    contents = file_object.read()
print(contents)

with open('learning_python.txt') as file_object:
    for line in file_object:
        print(line.rstrip())

lines_list = []
with open('learning_python.txt') as file_object:
    lines_list = file_object.readlines()
for line in lines_list:
    print(line.rstrip())
